﻿using Ewk.Math.Algebra.Algorithms.Matrices;
using Ewk.Math.Algebra.Algorithms.Matrices.Determinant;
using Ewk.Math.ComputationTypes;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Ewk.Math.Algebra.UnitTests.Determinant.DeterminantManipulationsTests.Int32Tests
{
    [TestClass]
    public class TransposeInt32Tests : DeterminantManipulationsInt32Base
    {
        [TestMethod]
        public void When_Transpose_Is_Called_Then_The_Value_Of_The_Determinant_Stays_The_Same()
        {
            IMatrixManipulations<int, Computable<int>> manipulations = new DeterminantManipulator<int>(Matrix, Determinant);
            var result = manipulations.Transpose();

            Assert.AreEqual(Determinant.Value, result.Value);
        }

        [TestMethod]
        public void When_Transpose_Is_Called_With_A_Computable_And_A_Null_Determinant_Then_The_Result_Is_Null()
        {
            IMatrixManipulations<int, Computable<int>> manipulations = new DeterminantManipulator<int>(Matrix, null);
            var result = manipulations.Transpose();

            Assert.IsNull(result);
        }
    }
}